<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // 编写函数 has(arr, 60)，要求判断数组中是否存在60这个元素，返回布尔类型
    var arr = [];
    function has(arr,n){
        for(var i = 0 ; i < arr.length ; i++){
            if(arr[i] == n){
                return true;
            }
        }
        return false;
        
    }
    arr = [40,54,45,45,60];
    console.log(has(arr,60))

</script>
</html>